Pinning an app from inside a folder did not refresh the
folder preview. FolderIcon._sync() was only listening
to folder GSettings changes, while pinning updates the
favorites setting instead.
As a result, _sync() was never called and the preview
could show stale icons or remain visible when the folder
became empty.
Fix this by also connecting _sync() to
AppFavorites::changed, ensuring the folder preview
updates correctly when favorites are modified.
Closes : https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/9026
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/4088>
this._folder.connectObject(
'changed', this._sync.bind(this), this);
+ const appFavorites = AppFavorites.getAppFavorites();
+ appFavorites.connectObject(
+ 'changed', this._sync.bind(this), this);
this._sync();
}